package com.nuist.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author 梁科
 * @Version 1.0
 * @ Date 2025/10/16 21:51
 */
@TableName(value = "meter")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "电表实体")
@Builder
public class Meter implements Serializable {
    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "电表id")
    private Integer id;
    /**
     * 总电量
     */
    @ApiModelProperty(value = "总电流")
    private Float totalCharge;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date timestamp;
}
